package com.zhou.common.operator.log.storage.mybatis.config;

import com.zhou.common.operator.log.core.OperateLogProperty;
import com.zhou.common.operator.log.core.service.OperateLogStorageService;
import com.zhou.common.operator.log.storage.mybatis.service.MybatisStorgeService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan(
        basePackages = {"com.zhou.common.operator.log.storage.mybatis"}
)
@MapperScan({"com.zhou.common.operator.log.storage.mybatis.**.mapper"})
public class OperatorLogMybatisConfig {

    @Bean
    public OperateLogStorageService mybatisStorageService(OperateLogProperty properties) {
        return new MybatisStorgeService(properties);
    }
}
